how to determine the reference angle